﻿using System;
using Orid.Management.Statistics.Tools.Decomposition.Model;

namespace Orid.Management.Statistics.Tools.Decomposition.Data
{
    class OrderOffline:Order
    {
       
        public override ModelOrder GetOrderItem(Guid OrderId )
        { 
           
            try
            {
                 ModelOrder model ;
                if (OrderId == null)
                {
                    return null;
                }



                string connectString =Config.Setting.SettingInstance.DBAddress_Offline;
                //[OrderDatas]
                string tableOrderName = Config.Setting.SettingInstance.OrderDatas_Offline;

                string tableMatterName = Config.Setting.SettingInstance.Matters_Offline;

                model = GetOrderItem(OrderId, connectString, tableOrderName, tableMatterName);

                OrderFlowProgress orderFlowProgress = new OrderFlowProgressOffline();

                model.ListModelProgress = orderFlowProgress.GetOrderFlowProgress(model.OrderID);

                 
                return model;
            }
            catch (System.Data.SqlClient.SqlException ex)
            {
                throw (new Exception(ex.Message));
            }
           
        }
         
    }
}
